package com.firexxx.vp.infrastructure.configuration;

import com.firexxx.vp.infrastructure.aop.TraceInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @description: TODO
 * @throws:
 * @author: zhuangzhang2
 * @date: 2020/02/20 20:53
 */
@Configuration
public class WebMvcConfigurer extends WebMvcConfigurationSupport {

    @Autowired
    private TraceInterceptor traceInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(traceInterceptor);
        super.addInterceptors(registry);
    }
}